window: Tweak visible focus behavior
authorMatthias Clasen <mclasen@redhat.com>
Tue, 21 Apr 2020 22:14:40 +0000 (18:14 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 23 Apr 2020 13:33:26 +0000 (09:33 -0400)
commitb0f2cd02ad39f3078c26c0dcf187bb5709167f3a
tree9d0d2eeb389f94dc7afcd0b903c555fbda3fcec4
parent7fe51a876c341c051a6a181fbadb1ef14479214f
window: Tweak visible focus behavior

Only turn on visible focus when a key event actually leads
to a change in focus location (ie, 'keynav').

Make the visible focus disappear after 5 seconds of no
keyboard interaction, to avoid permanent focus ring
distraction.

As an extra bonus, make it so that we make the focus
visible while the Alt key is pressed. This gives us
a 'find my focus!' shortcut, and goes well with the
prexisting use of Alt for finding mnemonics.

Discussed in: #2644
gtk/gtkwindow.c